/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * AdminEmisora.java
 *
 * Created on 26/01/2012, 08:16:00 AM
 */
package GUI;

import javax.swing.JPanel;

/**
 *
 * @author pepe
 */
public class AdminEmisora extends javax.swing.JPanel {

    /** Creates new form AdminEmisora */
    public AdminEmisora() {
        initComponents();
    }
    
    JPanel crearEmisora = new CrearEmisora();
    JPanel eliminarEmisora = new EliminarEmisora();
    

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        crearEmisoraJB = new javax.swing.JButton();
        eliminarEmisoraJB = new javax.swing.JButton();
        funcionEmisoraJP = new javax.swing.JPanel();

        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("Administracion de emisoras");

        crearEmisoraJB.setText("Crear");
        crearEmisoraJB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                crearEmisoraJBActionPerformed(evt);
            }
        });

        eliminarEmisoraJB.setText("Eliminar");
        eliminarEmisoraJB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                eliminarEmisoraJBActionPerformed(evt);
            }
        });

        funcionEmisoraJP.setLayout(new java.awt.BorderLayout());

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(82, 82, 82)
                        .addComponent(crearEmisoraJB)
                        .addGap(18, 18, 18)
                        .addComponent(eliminarEmisoraJB))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(funcionEmisoraJP, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(crearEmisoraJB)
                    .addComponent(eliminarEmisoraJB))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(funcionEmisoraJP, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

private void crearEmisoraJBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_crearEmisoraJBActionPerformed
    this.funcionEmisoraJP.setVisible(false);
    this.funcionEmisoraJP.removeAll();
    this.funcionEmisoraJP.add(crearEmisora);
    this.funcionEmisoraJP.setVisible(true);
}//GEN-LAST:event_crearEmisoraJBActionPerformed

private void eliminarEmisoraJBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_eliminarEmisoraJBActionPerformed
    this.funcionEmisoraJP.setVisible(false);
    this.funcionEmisoraJP.removeAll();
    this.funcionEmisoraJP.add(eliminarEmisora);
    this.funcionEmisoraJP.setVisible(true);
}//GEN-LAST:event_eliminarEmisoraJBActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton crearEmisoraJB;
    private javax.swing.JButton eliminarEmisoraJB;
    private javax.swing.JPanel funcionEmisoraJP;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables
}
